parser grammar DglParser;

options {
  language = Java;
  tokenVocab = DglLexer;
}
@header {
   package ejercicio8; 
}

graph: GRAPH COLON LLAVOP (sentencia)+ LLAVCL EOF;

//comentario: COMENTARIO;
sentencia: (node | edge);


node: NODE COLON LLAVOP (atrib_node)+ LLAVCL;
edge: EDGE COLON LLAVOP (atrib_edge)+ LLAVCL;

atrib_node: (title | label | borderstyle);
atrib_edge: (source | target | arrowstyle);

title: TITLE COLON CADENA;
label: LABEL COLON CADENA;
borderstyle: BORDER COLON (SOLID | DASHED | DOT);

source:SOURCE COLON CADENA;
target: TARGET COLON CADENA;
arrowstyle: ARROW COLON (SOLID | LINE | NONE);